{% extends "base.html" %}
{% import "default/moudle_page_index.html" as macros %}

{% block title %}Article List{% endblock %}
{% block head %}
{{ super() }}
<link href="{{ url_for('static', filename='default/css/page_article_list.css') }}" rel="stylesheet" type="text/css" />
{% endblock %}

{% block content %}
<div style="clear:both;"></div>
<div class="layout_header"></div>
<div style="clear:both;"></div>
<div class="layout_body">
    <div style="clear:both;"></div>
    <div class="layout_row">
        <div style="clear:both;"></div>
        <div class="layout_left">
            <div class="article_list_toolbar">
                <div class="tool_bar">
                    <span>排序：</span>
                    <span>更新时间</span>
                    <span>创建时间</span>
                    <span>热度</span>
                </div>
                <div class="tool_bar">
                    <span>列表模式：</span>
                    <span>标题+预览</span>
                    <span>标题+全文</span>
                    <span>仅标题</span>
                </div>
                <div style="clear:both;"></div>
            </div>
            <div>
                <ul id="article_list">
                    {% for article in articleList %}
                    <li>
                        <div class="article_title">
                            <h3><a href="{{ url_for('main.article_x', unique_domain=article.author_domain, article_id=article.id) }}">{{ article.title }}</a></h3>
                        </div>
                        <div class="article_content">
                            <div></div>
                            <div></div>
                        </div>
                        <div class="article_meta">
                            <span>作者：<a href="{{ url_for('main.user_domain', unique_domain=article.author_domain) }}">{{ article.author_name }}</a></span>
                            <span>发布于：{{ article.create_time }}</span>
                            <span>阅读：{{ article.pv_num }}</span>
                            <span>赞：{{ article.praise_num }}</span>
                            <span>踩：{{ article.dispraise_num }}</span>
                            <span><a href="">阅读全文...</a></span>
                        </div>
                    </li>
                    {% endfor %}
                </ul>
                {% if articleList %}{% else %}<h1>Article not exist! Create it?</h1>{% endif %}
                {% if pagination %}
                    {{ macros.pagination_widget(pagination, url_for('main.article', unique_domain = unique_domain)) }}
                {% endif %}
            </div>
        </div>
        <div class="layout_right">
        </div>
    </div>
</div>
<div style="clear:both;"></div>

{% endblock %}

{% block scripts %}
{{ super() }}
<script src="{{ url_for('static', filename='default/js/page_article_list.js') }}" type="text/javascript"></script>
{% endblock %}
